// 引入模块 koa
const Koa = require('koa')

// 创建web服务对象
const app = new Koa()

app.use((ctx, next) => {
  console.log("我是中间件11")
  ctx.body = "111"
  next()
})
app.use((ctx, next) => {
  console.log("我是中间件22")
  ctx.body = "222"
  next()
})
app.use((ctx, next) => {
  console.log("我是中间件33")
  ctx.body = "333"
})

// 监听 
app.listen(8080, () => {
  console.log("run on port 8080")
})
